<script type="text/javascript">
//<![CDATA[
	google.load('search', '1');
	var searchControl;
	function OnLoad() {
	var php = new google.search.WebSearch();
	php.setUserDefinedLabel("php.net");
	php.setSiteRestriction("php.net");

	var gc = new google.search.WebSearch();
	gc.setUserDefinedLabel("code.google.com");
	gc.setSiteRestriction("code.google.com");

	var sfg = new google.search.WebSearch();
	sfg.setUserDefinedLabel("sourceforge.net");
	sfg.setSiteRestriction("sourceforge.net");

	var cp = new google.search.WebSearch();
	cp.setUserDefinedLabel("codeproject.com");
	cp.setSiteRestriction("codeproject.com");

	var ws = new google.search.WebSearch();
	ws.setUserDefinedLabel("web");

	searchControl = new google.search.SearchControl();
	searchControl.addSearcher(ws);
	searchControl.addSearcher(php);
	searchControl.addSearcher(gc);
	searchControl.addSearcher(sfg);
	searchControl.addSearcher(cp);
	
	

	var options = new google.search.DrawOptions();
	options.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
	searchControl.draw(document.getElementById("searchResults"), options);

	// Execute an inital search
	searchControl.execute("PHP");
	}
        function search(str){
        searchControl.execute("php" + "+" + str);
	}
	google.setOnLoadCallback(OnLoad, true);
	
//]]>
</script>

<script type="text/javascript">
//<![CDATA[
  var move = false;
  function createTextAreaWithLines(id)
  {
    var el = document.createElement('TEXTAREA');
    var ta = document.getElementById(id);
   
    var string = '';
    for(var no=1;no<300;no++){
      if(string.length>0)string += '\n';
      string += no;
    }
   
    el.className      = "textAreaWithLines";
    el.style.top   = (ta.offsetTop) + "px";
    el.style.left  = (ta.offsetLeft - 25) + "px";
    el.style.height   = (ta.offsetHeight-3) + "px";
    el.style.width    = "2%";
    el.style.marginleft = "0px";
    el.style.position = "absolute";
    el.style.overflow = 'hidden';
    el.style.textAlign = 'right';
    el.style.paddingRight = '0.8em';
    el.innerHTML      = string;  //Firefox renders \n linebreak
    el.innerText      = string; //IE6 renders \n line break
    el.style.zIndex   = 5;
    ta.style.zIndex   = 1;
    ta.style.position = "relative";
    ta.parentNode.insertBefore(el, ta.nextSibling);
    setLine();
    ta.focus();
   
    ta.onkeydown    = function() { setLine(); }
    ta.onmousedown  = function() { setLine(); move=true; }
    ta.onmouseup    = function() { setLine(); move=false; }
    ta.onmousemove  = function() { if(move){setLine();} }
	 
    function setLine(){
      el.scrollTop   = ta.scrollTop;
      el.style.top   = (ta.offsetTop) + "px";
      el.style.left  = (ta.offsetLeft - 25) + "px";
    }
  }
 //]]>
</script>